package cn.bj.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.bj.beans.Yxfw_jewellery;
import cn.bj.dao.Yxfw_jewelleryMapper;

@Service
public class JewelleryService {
	@Autowired
	Yxfw_jewelleryMapper yxfw_jewelleryMapper;

	// 查询所有
	public List<Yxfw_jewellery> getAllCandys() {
		return yxfw_jewelleryMapper.selectByExample(null);
	}

	// 插入
	public int insrtJewe(Yxfw_jewellery jewe) {
		return yxfw_jewelleryMapper.insert(jewe);
	}

	// 删除
	public int deleteJewe(Integer id) {
		return yxfw_jewelleryMapper.deleteByPrimaryKey(id);
	}

	// 查询单个
	public Yxfw_jewellery selectById(Integer id) {
		return yxfw_jewelleryMapper.selectByPrimaryKey(id);
	}

	// 删除
	public int updateJewe(Yxfw_jewellery jewe) {
		return yxfw_jewelleryMapper.updateByPrimaryKey(jewe);
	}

}
